from select import *
from socket import *
from time import *


#创建几个IO对象
sock=socket()
sock.bind(("0.0.0.0",1234))
sock.listen(3)

sock1 =socket(AF_INET,SOCK_DGRAM)

file =open("16.txt")

ep =epoll()
map={sock.fileno():sock,sock1.fileno():sock1}
ep.register(sock,EPOLLIN)
ep.register(sock1,EPOLLOUT)

sleep(5)
print("开始监控IO")
events=ep.poll()
print(events)



